<?php include "../public/header.php";?>
<?php include "../public/header_edit.php";?>
<body>
    <form class="layui-form layui-form-pane" id="operatePage">
        <div class="page-title">
            <div class="page-title-con">
                <span>关闭任务</span>
                <div class="move_title"></div>
                <?php include "../public/sub.php";?>
            </div>
        </div>

        <div class="block-generic">


            <div class="main-container">
                <div class="layui-form-item height_auto">
                    <div class="layui-row layui-col-space10">
                        <div class="layui-col-md12">
                            <label class="layui-form-label label_textarea"><text>*</text>关闭说明</label>
                            <div class="layui-input-block">
                                <textarea id="explainclose" name="explainclose" placeholder="请输入" class="layui-textarea"></textarea>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </form>
<script>
    var param_id = getQueryVariable('id') || 0;
    $("#operatePage").validate({
        rules: {
            explainclose: {required: true},
        },
        messages:{
            explainclose: {required: "请输入"},
        }
    });

    layui.use(['laytp', 'form'], function() {
        var form = layui.form, layer = layui.layer;


        form.on('submit(add)', function(data){
            var validRes = $("#operatePage").valid();
            if(!validRes){return false;}

            data.field.id = param_id;
            facade.ajax({url: ask_task_close, data:data.field}).done(function(res){
                if (res.code === 2000) {
                    dataPostTimeOut();
                }
            });

            return false;
        });

    });

</script>
</body>
</html>
